package com.zz.repository;

import com.zz.entity.Commodity;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;


import javax.validation.constraints.Past;
import java.util.List;

/**
 * @Description: java类作用描述
 * @Author: ll
 * @CreateDate: 2019/6/7$14:28$
 */
@Repository
public interface CommodityRepository extends JpaRepository<Commodity,Long> {

//根据id删除
@Modifying
@Transactional
    @Query(value = "delete from commodity where id=?1 ", nativeQuery = true)

    public void deleteCommodityById(long id);




}
